
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
	<title>可用可信家庭市场</title>
	<!--                       CSS                       -->
	<!-- Reset Stylesheet -->
	<link rel="stylesheet" href="/static/css/reset.css" type="text/css" media="screen" />
	<!-- Main Stylesheet -->
	<link rel="stylesheet" href="/static/css/style.css" type="text/css" media="screen" />
	<!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid -->
	<link rel="stylesheet" href="/static/css/invalid.css" type="text/css" media="screen" />
	<!--                       Javascripts                       -->
	<!-- jQuery -->
	<script type="text/javascript" src="/static/scripts/jquery-1.3.2.min.js"></script>
	<!-- jQuery Configuration -->
	<script type="text/javascript" src="/static/scripts/simpla.jquery.configuration.js"></script>
	<!-- Facebox jQuery Plugin -->
	<script type="text/javascript" src="/static/scripts/facebox.js"></script>
	<!-- jQuery WYSIWYG Plugin -->
	<script type="text/javascript" src="/static/scripts/jquery.wysiwyg.js"></script>
	<!-- jQuery Datepicker Plugin -->
	<script type="text/javascript" src="/static/scripts/jquery.datePicker.js"></script>
	<script type="text/javascript" src="/static/scripts/jquery.date.js"></script>
	<!-- jQuery -->
	<script src="bower_components/jquery/jquery.min.js"></script>
	<link rel="stylesheet" type="text/css" media="all" href="/static/css/motai.css">
	<script type="text/javascript" src="/static/js/jquery-1.9.1.min.js"></script>
	<script type="text/javascript" charset="utf-8" src="/static/js/jquery.leanModal.min.js"></script>
	<style>
		body{
			font-family:黑体;
		}
		.tmain {
			margin-left:0px;
			width:1123px;
			text-align:center;
			background-color:#d9edf7;
			padding-left:90px;
			height:600px;
		}

		#cgmain {width:1123px;
			text-align:center;
			}
			
		.pihao_ul{
			list-style:none;
			border:hidden;
			background-color:#d9edf7;
		}
		.pihao_ul li {
			float:left;
			width:250px;text-align:center;line-height:33px;
			font-size:15px;
			list-style-type:none;
		}

		.menu_ul ul {
			list-style-type:none;
			text-align:center;
		}
		.menu_ul li {
			border-left:1px solid #ccc;border-top:1px solid #ccc;float:left;
			width:110px;height:30px;text-align:center;line-height:33px;
			font-size:15px;
			list-style-type:none;
			
		}
		
		.menu_ul li.b1 {border-bottom:1px solid #ccc}
		.menu_ul li.c1 {border-right:1px solid #030303}
		.menu_ul li.r1 {border-right:1px solid #ccc}

		.menu_ul li.cm1 {width:150px;}
		.menu_ul li.bj1 {width:60px;}
		.menu_ul li.gg1 {width:80px;}
		.menu_ul li.sl1 {width:60px;}
		.menu_ul li.bz1 {width:150px;}

	</style>
</head>
<body>
<div id="body-wrapper">
	<!-- Wrapper for the radial gradient background -->
	<div id="sidebar">
		<div id="sidebar-wrapper">

			<div id="profile-links">
				<!-- Logo (221px wide) -->
				<a href="#"><img id="logo" src="/static/images/logo.png" alt="Simpla Admin logo" /></a>

				{$_COOKIE['user_name']},你好 <br/>
				| <a href="/index.php/index/index/uexit" title="Sign Out">退出</a> </div>

			 <ul id="main-nav">
                <!-- Accordion Menu -->
                <!--<li> <a href="#/" class="nav-top-item no-submenu">-->
                    <!--&lt;!&ndash; Add the class "no-submenu" to menu items with no sub menu &ndash;&gt;-->
                    <!--Dashboard </a> </li>-->
                 {if condition="!empty($powers['order_action'])"}
                <li> <a href="#" class="nav-top-item"> 订单操作</a>
                    <ul>
                    	
                        <li><a href="/index.php/index/index/neworder_list">新订单</a></li>
                        <!-- Add class "current" to sub menu items also -->
                        <li><a href="/index.php/index/index/addorder">创建新订单</a></li>
                        <li><a href="/index.php/index/index/allorder_list">所有订单</a></li>
                    </ul>
                </li>
           	{/if}
           	 {if condition="!empty($powers['cg_action'])"}
                <li> <a href="#" class="nav-top-item"> 采购单 </a>
                    <ul>
                        <li><a href="/index.php/index/index/newcg_list">待处理 采购单</a></li>
                        <li><a href="/index.php/index/index/cg_history">采购单历史</a></li>
                    </ul>
                </li>
             {/if}
              {if condition="!empty($powers['table_action'])"}
                <li> <a href="#" class="nav-top-item"> 报表 </a>
                    <ul>
                        <li><a href="/index.php/index/biao/daybiao">日报表</a></li>
                        <li><a href="/index.php/index/biao/yuebiao">月报表</a></li>
                        <li><a href="/index.php/index/biao/nianbiao">年报表</a></li>
                    </ul>
                </li>
               {/if}
                {if condition="!empty($powers['goods_action'])"}
                <li> <a href="#" class="nav-top-item current">菜品管理 </a>
                    <ul>
                        <li><a class="current" href="/index.php/index/goods/goods">所有菜品</a></li>
                        <li><a href="/index.php/index/goods/categorys">所有分类</a></li>
                    </ul>
                </li>
                {/if}
                 {if condition="!empty($powers['promotion_action'])"}
                 <li> <a href="#" class="nav-top-item"> 推广活动 </a>
                    <ul>
                        <li><a href="/index.php/index/promotion/snlist">SN优惠码</a></li>
                    </ul>
                </li>
                {/if}
                <li> <a href="#" class="nav-top-item"> 个人信息 </a>
                    <ul>
                        <li><a href="/index.php/index/index/user_info">查看信息</a></li>
                        <li><a href="/index.php/index/index/update_pass">修改密码</a></li>
                    </ul>
                </li>
       
                {if condition="!empty($powers['super'])"}
                 <li><a href="#" class="nav-top-item"> 用户管理 </a>
                 	<ul>
                        <li><a href="/index.php/index/admin/user_admin">用户权限</a></li>
                    </ul>
                 </li>
                {/if}

            </ul>
            <!-- End #main-nav -->
		</div>
	</div>
	<!-- End #sidebar -->
	<div id="main-content">
		<!-- Main Content Section with everything -->

		<h4 style="font-family: 微软雅黑">所有菜品</h4>
		<div class="content-box">

			<!-- Start Content Box -->
			<div class="content-box-header" style="height:40px;">

				<ul class="content-box-tabs">
					<?php $m=1;?>
				{volist name="list" id="mv"}
					<li>
						{if condition="$m==1"}
							<a href="#tab{$m}" style="text-align:center;" class="default-tab">&nbsp;{$mv.categorys.gcat_name}&nbsp;</a>
						{else /}
							<a href="#tab{$m}" style="text-align:center;">&nbsp;{$mv.categorys.gcat_name}&nbsp;</a>
						{/if}
						<?php ++$m;?>
					</li>
					
				{/volist}
					<li>
						<a href="#trash" style="text-align:center;">&nbsp;回收站&nbsp;</a>
					</li>
				</ul>
				<div class="clear"></div>
			</div>
			<!-- End .content-box-header -->
			<div class="content-box-content">
				<?php $gv=1;?>
				{foreach name="list" id="v" key="kk"}
	
					{if condition="$gv==1"}
					<div class="tab-content default-tab" id="tab{$gv}">
					{else/}
					<div class="tab-content" id="tab{$gv}">	
					{/if}
					
								
								 <table class="table1">
                        <thead>
                        <tr>
                            <th>编号</th>
                            <th>菜品图片</th>
                            <th>菜品名称</th>
                            <th>规格</th>
                            <th>现价</th>
                            <th>会员价</th>
                            <th>销量</th>
                            <th>每日限量</th>
                            <th>餐盒费</th>
                            <th>可见度</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <?php $p=1;?>
                   {volist name="v['goods']" id="vo"}
                        {if condition="$p%2==1"}
                        <tr  style="height:30px;text-align:center;" onmouseover="this.style.backgroundColor='#b9df70';" onmouseout="this.style.backgroundColor='#EAEAEA';">
                         {else/}
                        <tr  style="height:30px;" onmouseover="this.style.backgroundColor='#b9df70';" onmouseout="this.style.backgroundColor='#FFFFFF';">
                        {/if}
                            <?php ++$p;?>
                            <td>{$vo.goods_id}</td>
                            <td style="vertical-align:bottom;">
                            	<img src="http://www.kykxmk.com{$vo.list_pic}" width="60px" height="50px"/>
                            </td>
                            <td title="title">
       <a  target="_blank" href="/index.php/index/goods/goods_look/goods_id/{$vo.goods_id}">{$vo.name}</a></td>
                            </td>
                           
                            <td>{$vo.unit}</td>
                            <td>{$vo.price}</td>
                            <td>{$vo.vip_price}</td>
                            <td>{$vo.sell_count}<br/></td>
                            <td> {$vo.limit}</td>
                            <td> {$vo.tools_price}</td>
							<td>
								{if condition="$vo.newuser==1"}
									仅新用户可见
								{/if}
							</td>
                            <td>
                                <!-- Icons -->
                                <a style="color:white" href="/index.php/index/goods/goods_update/goods_id/{$vo.goods_id}" class="button small">编辑</a>
                               <div style="float:right;"><img src="/static/images/icons/cross.png" alt="删除菜品" onClick="goods_delete({$vo.goods_id})"/></div>
                            </td>
                        </tr>
                    {/volist}
                        </tbody>
                    </table>
					
					</div>
					<?php ++$gv;?>
				{/foreach}
				<!--回收站 -->
				<div class="tab-content" id="trash">	
								
								 <table class="table1">
                        <thead>
                        <tr>
                            <th>编号</th>
                            <th>菜品图片</th>
                            <th>菜品名称</th>
                            <th>规格</th>
                            <th>现价</th>
                            <th>会员价</th>
                            <th>销量</th>
                            <th>每日限量</th>
                            <th>餐盒费</th>
                            <th>可见度</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <?php $p=1;?>
                   {volist name="trash" id="vo"}
                        {if condition="$p%2==1"}
                        <tr  style="height:30px;text-align:center;" onmouseover="this.style.backgroundColor='#b9df70';" onmouseout="this.style.backgroundColor='#EAEAEA';">
                         {else/}
                        <tr  style="height:30px;" onmouseover="this.style.backgroundColor='#b9df70';" onmouseout="this.style.backgroundColor='#FFFFFF';">
                        {/if}
                            <?php ++$p;?>
                            <td>{$vo.goods_id}</td>
                            <td style="vertical-align:bottom;">
                            	<img src="http://www.kykxmk.com{$vo.list_pic}" width="60px" height="50px"/>
                            </td>
                            <td title="title">
       <a  target="_blank" href="/index.php/index/goods/goods_look/goods_id/{$vo.goods_id}">{$vo.name}</a></td>
                            </td>
                           
                            <td>{$vo.unit}</td>
                            <td>{$vo.price}</td>
                            <td>{$vo.vip_price}</td>
                            <td>{$vo.sell_count}<br/></td>
                            <td> {$vo.limit}</td>
                            <td> {$vo.tools_price}</td>
							<td>
								{if condition="$vo.newuser==1"}
									仅新用户可见
								{/if}
							</td>
                            <td>
                                <!-- Icons -->
                                <a style="color:white" href="/index.php/index/goods/goods_update/goods_id/{$vo.goods_id}" class="button small">编辑</a>
                               <div style="float:right;"><img src="/static/images/icons/cross.png" alt="删除菜品" onClick="goods_delete({$vo.goods_id})"/></div>
                            </td>
                        </tr>
                    {/volist}
                        </tbody>
                    </table>
					
					</div>
				<!--回收站 -->
			</div>
			<!-- End .content-box-content -->
		</div>
		<!-- End .content-box -->



	</div>
	<!-- End #main-content -->
</div>

<script src="http://cdn.bootcss.com/jquery/3.1.0/jquery.min.js"></script>
<script src="http://cdn.bootcss.com/amazeui/2.7.2/js/amazeui.min.js"></script>

<script src="./tpl/Hm/default/static/order/js/jquery-1.7.1.js" type="text/javascript"></script>
<script>
	
function cancel_motai()
    {
    		return false;
    }
function goods_delete(e)
    {
    		if(confirm("你确信要删除该菜品吗？"))
        {
            //如果是true ，那么就把页面转向
            location.href="/index.php/index/goods/goods_delete/goods_id/"+e;
        }
        else
        {
            return false;
        }
    }
</script>

<!-- won模态框（Modal） -->
<div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-1" style="display:none;">
	<div class="am-modal-dialog">
		<div class="am-modal-hd">
			<a onclick="cancel_motai()" class="am-close am-close-spin" data-am-modal-close>&times;</a>
		</div>
		<div class="am-modal-bd">
			打印成功后，此页面将不再显示该采购表<br/><br/>
			<form method="post" action="/index.php/index/index/printcg_success">
				<input type="hidden" name="cg_number" value="" id="reids_number"/>
				<button type="submit" class="submit btn btn-primary">
					确定已打印
				</button>
			</form>
		</div>
	</div>
</div>
<!-- won模态框（Modal） -->
</body>
</html>
